package com.ruicar.afs.cloud.account.dto.tree;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ruicar.afs.cloud.account.enums.rules.RuleItemType;
import com.ruicar.afs.cloud.common.core.enums.AfsEnumDeserializer;
import com.ruicar.afs.cloud.common.core.enums.AfsEnumSerializer;
import lombok.Data;

import java.util.List;

@Data
public class RuleTreeDto {
    @JsonSerialize(using= ToStringSerializer.class)
    private Long id ;
    private Long ruleId ;
    @JSONField(serializeUsing = AfsEnumSerializer.class,deserializeUsing = AfsEnumDeserializer.class)
    private RuleItemType type ;
    private String label ;
    private String key ;
    private boolean not ;
    @JsonSerialize(using= ToStringSerializer.class)
    private Long parentId ;
    private List<RuleTreeDto> rows;
    private RuleTreeExpressDto express;
}
